package com.anolesoft.yr.mbus.cont.ctrl;

import cn.hutool.core.util.StrUtil;
import com.anolesoft.common.core.web.domain.AjaxResult;
import com.anolesoft.yr.mbus.cont.entity.ContType;
import com.anolesoft.yr.mbus.cont.entity.ContTypeExample;
import com.anolesoft.yr.mbus.cont.service.ContTypeService;
import com.google.common.collect.Lists;
import org.checkerframework.checker.units.qual.C;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cont/cont_type")
public class ContTypeController {

    public ContTypeController(ContTypeService contTypeService) {
        this.contTypeService = contTypeService;
    }

    private ContTypeService contTypeService;

    @RequestMapping("/getAddSelect")
    public  List<ContType> getAddSelect(){
        List<ContType> contTypes = contTypeService.selectContAddType();
        return contTypes;
    }
    @RequestMapping("/getAllSelect")
    public  List<ContType> getAllSelect(){
        ContTypeExample contTypeExample = new ContTypeExample();
/*
        contTypeExample.createCriteria().andNameLike(condition);
*/
        List<ContType> contTypes = contTypeService.selectByExample(contTypeExample);
        return contTypes;
    }

}
